package com.yang.controller;

import com.yang.domain.Result;
import com.yang.service.CategoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("category")
@RestController
public class CategoryController {

    @Resource
    private CategoryService categoryService;

    /**
     * 查询所有文章分类
     * @return 分类集合
     */
    @GetMapping("getCategoryList")
    public Result getCategoryList(){
        return categoryService.getCategoryList();
    }
}
